home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-08-08 | 4.9 KB | 278 lines | [TEXT/MPS ] |
- /*------------------------------------------------
- # Simple NoDraft Printing Application
- #
- # NoDraft
- #
- # NoDraft.r - Rez Source
- #
- # Copyright © 1991 Greg Wilson.
- # Copyright © 1991 MacTutor.
- # All rights reserved.
- #
- -------------------------------------*/
-
- #include "Types.r"
-
- #include "NoDraft.h"
-
-
- /* we use an MBAR resource to load all menus */
-
- resource 'MBAR' (rMenuBar, preload) {
- { mApple, mFile, mEdit }; /* four menus */
- };
-
- resource 'MENU' (mApple, preload) {
- mApple, textMenuProc,
- AllItems & ~MenuItem2,
- /* Disable dashed line, enable About and DAs */
- enabled, apple,
- {
- "About NoDraft…",
- noicon, nokey, nomark, plain;
- "-",
- noicon, nokey, nomark, plain
- }
- };
-
- resource 'MENU' (mFile, preload) {
- mFile, textMenuProc,
- MenuItem12, /* enable Quit, program does rest */
- enabled, "File",
- {
- "New",
- noicon, "N", nomark, plain;
- "Open",
- noicon, "O", nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Close",
- noicon, "W", nomark, plain;
- "Save",
- noicon, "S", nomark, plain;
- "Save As…",
- noicon, nokey, nomark, plain;
- "Revert",
- noicon, nokey, nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Page Setup…",
- noicon, nokey, nomark, plain;
- "Print…",
- noicon, nokey, nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Quit",
- noicon, "Q", nomark, plain
- }
- };
-
- resource 'MENU' (mEdit, preload) {
- mEdit, textMenuProc,
- NoItems, /* disable all, program does it */
- enabled, "Edit",
- {
- "Undo",
- noicon, "Z", nomark, plain;
- "-",
- noicon, nokey, nomark, plain;
- "Cut",
- noicon, "X", nomark, plain;
- "Copy",
- noicon, "C", nomark, plain;
- "Paste",
- noicon, "V", nomark, plain;
- "Clear",
- noicon, nokey, nomark, plain
- }
- };
-
- /* this ALRT and DITL are used as About screen */
-
- resource 'ALRT' (rAboutAlert, purgeable) {
- {40, 20, 170, 372},
- rAboutAlert,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, silent,
- /* [2] */
- OK, visible, silent,
- /* [3] */
- OK, visible, silent,
- /* [4] */
- OK, visible, silent
- }
- };
-
- resource 'DITL' (rAboutAlert, purgeable) {
- { /* array DITLarray: 5 elements */
- /* [1] */
- {98, 252, 118, 332},
- Button {
- enabled,
- "OK"
- },
- /* [2] */
- {6, 13, 71, 329},
- StaticText {
- disabled,
- "Simple Program which modifies Print Dial"
- "ogs to disable the Draft mode Radio Butt"
- "on and add a Filter Proc Function."
- },
- /* [3] */
- {101, 14, 117, 243},
- StaticText {
- disabled,
- "Copyright © 1991 MacTutor"
- },
- /* [4] */
- {75, 13, 91, 141},
- StaticText {
- disabled,
- "Written by:"
- },
- /* [5] */
- {74, 155, 94, 259},
- StaticText {
- disabled,
- "Greg Wilson"
- }
- }
- };
-
- /* this ALRT and DITL are used as error screen */
-
- resource 'ALRT' (rUserAlert, purgeable) {
- {40, 20, 120, 260},
- rUserAlert,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, silent,
- /* [2] */
- OK, visible, silent,
- /* [3] */
- OK, visible, silent,
- /* [4] */
- OK, visible, silent
- }
- };
-
- resource 'DITL' (rUserAlert, purgeable) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {50, 150, 70, 230},
- Button {
- enabled,
- "OK"
- },
- /* [2] */
- {10, 60, 30, 230},
- StaticText {
- disabled,
- "NoDraft - Error occurred!"
- },
- /* [3] */
- {8, 8, 40, 40},
- Icon {
- disabled,
- 2
- }
- }
- };
-
- resource 'WIND' (rWindow, "A Window") {
- {42, 2, 330, 508},
- DocumentProc, invisible, GoAway, 0x0, "A Window"
- };
-
- resource 'DLOG' (130, purgeable) {
- {48, 24, 368, 532},
- dBoxProc,
- invisible,
- noGoAway,
- 0x0,
- 130,
- ""
- };
-
- resource 'STR#' (kErrStrings, purgeable) {
- {
- "An error has occurred";
- "Application Memory Size is too small";
- "Not enough memory to run NoDraft";
- "Cannot create window";
- }
- };
-
- type 'PSMP' as 'STR ';
-
- resource 'PSMP' (0) {
- "Simple Demo of Modifying Printing Dialogs - Version ß 1.0"
- };
-
- resource 'ICN#' (128) {
- { /* array: 2 elements */
- /* [1] */
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 07FF FF00 0600 0080 0500 0040"
- $"0480 0020 0440 0010 0420 0008 0410 0004"
- $"040F FFFE 0408 0002 0408 0002 0408 0002"
- $"0408 0002 0408 0002 0408 0002 0408 0002"
- $"0408 0002 0408 0002 0408 0002 0408 0002"
- $"0208 0002 0108 0002 0088 0002 0048 0002"
- $"0028 0002 0018 0002 000F FFFE",
- /* [2] */
- $"000F FFFC 001F FFF8 003F FFF0 007F FFE0"
- $"00FF FFC0 0600 0080 05FF FF80 0792 49C0"
- $"07C9 24E0 07E4 9270 07F2 4918 07FF FFFC"
- $"07FF FFFE 07FF FFFE 07FF FFFE 07FF FFFE"
- $"07FF FFFE 07FF FFFE 07FF FFFE 07FF FFFE"
- $"07FF FFFE 07FF FFFE 07FF FFFE 07FF FFFE"
- $"03FF FFFE 01FF FFFE 00FF FFFE 007F FFFE"
- $"003F FFFE 001F FFFE 000F FFFE"
- }
- };
-
- resource 'BNDL' (128) {
- 'PSMP',
- 0,
- {
- 'ICN#',
- {
- 0, 128
- },
- 'FREF',
- {
- 0, 128
- }
- }
- };
-
- resource 'FREF' (128) {
- 'APPL',
- 0,
- ""
- };
-
- resource 'SIZE' (-1) {
- dontSaveScreen,
- acceptSuspendResumeEvents,
- enableOptionSwitch,
- canBackground,
- multiFinderAware,
- backgroundAndForeground,
- dontGetFrontClicks,
- ignoreChildDiedEvents,
- not32BitCompatible,
- reserved,
- reserved,
- reserved,
- reserved,
- reserved,
- reserved,
- reserved,
- kPrefSize * 1024,
- kMinSize * 1024
- };
-